export default class Response{
    code:number
    message:string
    data:any
    constructor(code:number,message:string,data?:any){
        this.code = code;
        this.message =message;
        if(data){
            this.data = data;
        }
    }
    static SUCCESS(data?:any):Response{
        return new Response(200,"ok",data)
    }
    static BAD_REQUEST(message="bad request"){
        return new Response(400,message)
    }
}